<script src="${rc.getContextPath()}/manage/js/dwzCustomJs/dwz.custom.advancedquery.js?v=${ver}" type="text/javascript"></script>
<#include "/common/pagerForm.html">
<form rel="pagerForm" method="post" action="" class="required-validate" onsubmit="return navTabSearch(this)">
<input type="hidden" id="advancedStatus" name="advancedStatus" value="${condition.advancedStatus!''}" />
<div class="pageHeader">
    <div class="searchBar">
         <ul class="searchContent">
             <li >
                <label><@label key='operationTaskNum.C,colon'>工序任务单编号：</@label></label> 
                <input type="text" name="operationTaskNum" value="${condition.operationTaskNum!''}"/>
             </li>
             <li><label><@label key="workCenterCode.C,colon">工作中心编号:</@label></label> 
             <input id="workCenterGrp.workCenterCode" name="workCenterCode" type="text" suggestFields="workCenterCode,workCenterText" postField="workCenterCode" 
             suggestUrl="${rc.getContextPath()}/manage/workCenter/workCenterSuggest" lookupGroup="workCenterGrp" autocomplete="off" value="${condition.workCenterCode!''}" /></li>
             <li>
                <label><@label key='plannedWorkUnitCode.C,colon'>计划作业单元：</@label></label> 
                <input type="text" name="workUnitCode" value="${condition.workUnitCode!''}" />
             </li>
         </ul>
         <ul class="searchContent">
             <li class="notnormal"><label><@label key='plannedstartDateTime.C,colon'>计划开始时间：</@label></label>
             <input type="text" class="required date"   name="minPlannedStartDateTime" readonly max_date="{maxPlannedStartDateTime}" 
             value="${condition.minPlannedStartDateTime!''}"/><a class="inputDateButton" href="javascript:;">选择</a></li>
             <li class="notnormal"><label><@label key="to.C,colon">至：</@label></label>
             <input type="text" class="required date"  name="maxPlannedStartDateTime" readonly min_date="{minPlannedStartDateTime}" 
             value="${condition.maxPlannedStartDateTime!''}"/><a class="inputDateButton" href="javascript:;">选择</a></li>
             <li><label><@label key="operation.C,colon">工序：</@label></label>
                <input id="operationOrdinalLookup.operationCode" readonly="readonly" type="hidden" name="operationCode" type="text" value="${condition.operationCode!''}"/>
                <input class="look" id="operationOrdinalLookup.operationText" name="operationText" type="text" value="${condition.operationText!''}" postField="operationCode" labelFields="operationCode,operationText" 
                suggestFields="operationCode,operationText" suggestUrl="${rc.getContextPath()}/manage/operation/operationSuggest" lookupGroup="operationOrdinalLookup"/>
                <a class="btnLook" href="${rc.getContextPath()}/manage/operation/operationLookUp?lookupType=radio" rel="operationLookUp_dialog" title="<@label key='select.C,operation.C'>选择工序</@label>" lookupGroup="operationOrdinalLookup" ></a>
            </li>
        </ul>
        <ul class="searchContent">
            <li class="notnormal"><label><@label key='plannedendDateTime.C,colon'>计划结束时间：</@label></label>
            <input type="text" class="required date"   name="minPlannedEndDateTime" readonly max_date="{maxPlannedEndDateTime}" value="${condition.minPlannedEndDateTime!''}"/><a class="inputDateButton" href="javascript:;">选择</a></li>
            <li class="notnormal"><label><@label key="to.C,colon">至：</@label></label>
            <input type="text" class="required date"  name="maxPlannedEndDateTime" readonly min_date="{minPlannedEndDateTime}" value="${condition.maxPlannedEndDateTime!''}"/><a class="inputDateButton" href="javascript:;">选择</a></li>
            <li class="query">
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit"><@label key="query.B">查询</@label></button>
                    </div>
                </div>
            </li>
            <li class="advancedQuery" >            
                <a id="advancedQuery"href="javascript:void(0);"   onclick="openAdvanced(navTab.getCurrentPanel())">
                    <@label key="advancedQuery.C">高级查询</@label>
                </a>
                <span  onclick="openAdvanced(navTab.getCurrentPanel());"></span>            
            </li>
        </ul>
    </div>
    <div id="collapsablePanel" style="display:none;" class="pageHeader" >
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@label key='productionOrderNum.C,colon'>生产订单编号：</@label></label> 
                    <input type="text" name="productionOrderNum" value="${condition.productionOrderNum!''}"/>
                </li>
                <li>
                    <label><@label key='orderType.C,colon'>订单类型：</@label></label> 
                    <select name="orderTypeCode">
                        <option value="" ><@label key='all.C'>所有</@label></option>
                        <#if orderTypes??>
                            <#list orderTypes as orderType>
                                <option value="${orderType.orderTypeCode!''}" <#if condition.orderTypeCode?? && condition.orderTypeCode == orderType.orderTypeCode> selected</#if> >${orderType.orderTypeText!''}</option>
                            </#list>
                        </#if>
                    </select>
                </li>
                <li>
                    <label><@label key='productionControlNum.C,colon'>生产管理号：</@label></label>
                    <input type="text" name="productionControlNum" value="${condition.productionControlNum!''}" />
                </li>
            </ul>
            <ul class="searchContent">
                <li>
                    <label><@label key='customer.C,colon'>客户：</@label></label> 
                    <input type="text" name="customer" value="${condition.customer!''}"/>
                </li>
                <li>
                    <label><@label key='customerOrder.C,colon'>客户订单：</@label></label> 
                    <input type="text" name="customerOrder" value="${condition.customerOrder!''}"/>
                </li>
                <li>
                    <label><@label key='priority.C,colon'>优先级：</@label></label> 
                    <input type="text" name="priority" class="digits" value="${condition.priority!''}"/>
                </li>
            </ul>
            <ul class="searchContent">
                <li ><label><@label key='productionlotNum.C,colon'>生产批次号：</@label></label><input type="text" name="productionlotNum" value="${condition.productionlotNum!''}"/></li>
                <li ><label><@label key='requirementDate.C,colon'>需求日期：</@label></label>
                <input type="text" class="date"   name="minRequirementDate" readonly max_date="{maxRequirementDate}" value="${condition.minRequirementDate!''}"/><a class="inputDateButton" href="javascript:;">选择</a>
                <li ><label><@label key="to.C,colon">至：</@label></label>
                <input type="text" class="date"  name="maxRequirementDate" readonly min_date="{minRequirementDate}" value="${condition.maxRequirementDate!''}"/><a class="inputDateButton" href="javascript:;">选择</a></li>
            </ul>
            <ul class="searchContent">
                <li ><label><@label key='materialCode.C,colon'>物料编号：</@label></label> <input type="text" name="materialCode" value="${condition.materialCode!''}"/></li>
                <li ><label><@label key='materialText.C,colon'>物料描述：</@label></label> <input type="text" name="materialText" value="${condition.materialText!''}"/></li>
            </ul>
        </div>
    </div>
</div>
</form>

<div class="pageContent">

    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="export" href="${rc.getContextPath()}/manage/operationplanRate/exportToExcel?tableId=rateTable" target="multiExport" tableId="rateTable" targetType="navTab" title="<@label key='confirmexportToExcel.M'>确定要导出这些记录吗?</@label>"><span><@label key="exportToExcel.D">导出EXCEL</@label></span></a></li>
            <li><a class="icon" target="dialog" mask="true" width="900" height="600" rel="producionOrderDetails_output"
            href="${rc.getContextPath()}/manage/operationplanRate/view?operationCode={operationCode}&navTabId=${navTabId!''}"><span><@label key="view.B">详情</@label></span></a></li>
        </ul>
    </div>
    
    <table class="table" id="rateTable" width="100%" layoutH="190">
        <thead>
            <tr>
                <th width="80" field="operationCode"><@label key="operationCode.C">工序编号</@label></th>
                <th width="80" field="operationText"><@label key="operationText.C">工序描述</@label></th>
                <th width="120" field="plannedQuantity"><@label key="processTaskNumber.C">工序任务单数量</@label></th>
                <th width="120" field="completedQuantity"><@label key="completeTaskNumber.C">达成任务数量</@label></th>
                <th width="120" field="unCompletedQuantity"><@label key="notcompleteTaskNumber.C">未达成任务数量</@label></th>
                <th width="80" field="rate"><@label key="attainmentRate.C">达成率</@label></th>          
            </tr>
        </thead>
        <tbody>
        <#if page??><#if (page.data?size>0)> <#list page.data as operationplanRate>
            <tr target="operationCode" rel="${operationplanRate.operationCode!''}">
                <td>${operationplanRate.operationCode!''}</td>
                <td>${operationplanRate.operationText!''}</td>                
                <td>${operationplanRate.plannedQuantity!''}</td>
                <td>${operationplanRate.completedQuantity!''}</td>
                <td>${operationplanRate.unCompletedQuantity!''}</td>
                <#if operationplanRate.color?? && (operationplanRate.color?number < 80)>
                <td><font style="color: red;">${operationplanRate.rate!''}</font></td>   
                <#else>
                <td>${operationplanRate.rate!''}</td>   
                </#if>                                     
            </tr>
        </#list>
        <#else>
        <tr target="product_id">
                <td colspan="20" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        <#else>
        <tr target="product_id">
                <td colspan="20" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        </tbody>
    </table>
    <#include "/common/panelBar.html">
</div>
<script>
 $(function(){
	 initAdvancedQuery(navTab.getCurrentPanel());
 })
</script>